﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AimGameLibrary.GameObject
{
    public class GameEqualsValue : GameOperators
    {
        protected override void Logic()
        {
            base.Logic();
            if (Listparent[0].GetType() == typeof(GameInt))
            {
                if (Listparent[1].GetType() == typeof(GameInt))
                    ((GameInt)Listparent[0]).MyinT = ((GameInt)Listparent[1]).MyinT;
                else if (Listparent[1].GetType() == typeof(GameFloat))
                    ((GameInt)Listparent[0]).MyinT = Convert.ToInt32(((GameFloat)Listparent[1]).MyfloaT);
            }
            else if (Listparent[0].GetType() == typeof(GameFloat))
            {
                if (Listparent[1].GetType() == typeof(GameInt))
                    ((GameFloat)Listparent[0]).MyfloaT = ((GameInt)Listparent[1]).MyinT;
                else if (Listparent[1].GetType() == typeof(GameFloat))
                    ((GameFloat)Listparent[0]).MyfloaT = ((GameFloat)Listparent[1]).MyfloaT;
            }
            else if (Listparent[0].GetType() == typeof(GameSpriteEffects) && Listparent[1].GetType() == typeof(GameSpriteEffects))
                ((GameSpriteEffects)Listparent[0]).MyspriteeffectS = ((GameSpriteEffects)Listparent[1]).MyspriteeffectS;
        }
       
    }
}
